std::basic_istream::peek

From Cppreference

Jump to: navigation, search
​basic_istream& unget();

Makes the last extracted character available again. Effectively calls ​rdbuf()->sungetc(). If ​good() != true, ​setstate(failbit) is called and the function returns.

Contents

Parameters

(none)

Return value

*this​

Example

See also

get
extracts characters
(public member function)
peek
reads the next character without extracting it
(public member function)
putback
puts character into input stream
(public member function)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages